export const FETCH_LEVELS_REQUEST = 'FETCH_LEVELS_REQUEST'
export const FETCH_LEVELS_SUCCESS = 'FETCH_LEVELS_SUCCESS'
export const FETCH_LEVELS_FAILURE = 'FETCH_LEVELS_FAILURE'

export interface LevelState {
  isFetching: boolean
  levels?: Array<Level>
  error?: Error
}

interface fetchLevelsSuccessAction {
  type: typeof FETCH_LEVELS_SUCCESS
  levels: Array<Level>
}
interface fetchLevelsFailureAction {
  type: typeof FETCH_LEVELS_FAILURE
  error: Error
}
interface fetchLevelsRequestAction {
  type: typeof FETCH_LEVELS_REQUEST
}
export type LevelsActionTypes =  fetchLevelsSuccessAction | fetchLevelsFailureAction | fetchLevelsRequestAction

export interface Level {
  no: string
  category: string
  row: string
  column: string
  inputs: string
  startPoint: string
  endPoint: string
  hurdles: Array<string>
}

